home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / graphic / iterat31.zip / FUNCTION.TXT < prev    next >
Text File  |  1993-11-17  |  50KB  |  967 lines

  1. A few comments about the functions in Iterate!
  2. ══════════════════════════════════════════════════════════════════════════════
  3.  
  4. Function A. x=c*x+a*cos(y)             y=d*y+b*sin(x+a*cos(y))
  5. ──────────────────────────────────────────────────────────────────────────────
  6. This was a mistake.  I was trying to make Function B.  (If you study the two,
  7. you'll see what happened.)  It turned out to be a rather fortunate mistake,
  8. though, as this function is more interesting than Function B.  I used this
  9. function in my composition "Chaotic Suite for Computer and Synthesizer".
  10.  
  11. Parameters
  12. ──────────
  13. On this function, I usually set a=b and c=d=1.  You can try a=b=1, then
  14. gradually increase this value to a=b=2, a=b=2.5 and so on.  You will see the
  15. function gradually break up and become more chaotic.
  16.  
  17. You can also experiment with setting 'a' and 'b' to different values.  This
  18. gives an interesting effect.  
  19.  
  20. If you change 'c' and 'd', you will probably want to keep them close to 1,
  21. i.e., c=.99, d=1.
  22.  
  23.  
  24.  
  25. Function B. x=c*x+a*cos(y)             y=d*y+b*sin(x)
  26. ──────────────────────────────────────────────────────────────────────────────
  27. Close to Function A.  In both Functions A and B you'll notice that the entire
  28. plane is tiled over with repetitive figures.  This is of course because of the
  29. periodic nature of the trig functions.
  30.  
  31. Parameters
  32. ──────────
  33. Try the same sorts of parameters as Function A.
  34.  
  35.  
  36. Function C. x=cos(mu)*x-sin(mu)*(y-x²)  y=sin(mu)*x+cos(mu)*(y-x²)
  37. ──────────────────────────────────────────────────────────────────────────────
  38. This function is due to Henon (one of the first mathematicians to put much
  39. study into the area we now call chaos theory).  I found it in a fascinating 
  40. book by Ekeland.  Unfortunately, I had to give the book back to the library, 
  41. and now I live 1000 miles away from the library, and I can't for the life of
  42. me remember the title.  
  43.  
  44. It is quite an interesting little book, though, if you can find it anywhere.  
  45. Ekeland discussed this function and had a graph of it.  I tried to duplicate
  46. the graph on my computer, and so Iterate! was born.
  47.  
  48. This function is area preserving, which simply means that if you take any 
  49. region and put it through the function, the resulting region has the same area 
  50. as the one you started with. Symbolically, you would say the for a region R 
  51. and a function F, the area of R = the area of F(R).
  52.  
  53. The fact that a function is area preserving has certain ramifications for the 
  54. physical interpretation of the function.  For instance, imagine a planet 
  55. revolving around the sun. Imagine a plane which cuts through the planet's 
  56. orbit at right angles to the orbit.  Imagine that each time the planet comes 
  57. around the sun, you mark the spot where its center of gravity passes through 
  58. the plane.  
  59.  
  60. (If this explanation was too complicated for you, just think of making a dot
  61. on the spot where the earth is at 12 midnight on December 31st.  Make a new dot
  62. every year on December 31st.)  
  63.  
  64. What have we got?  An iterated function, of course.  You can think 
  65. of the planet as being the "function", and each orbit of the planet is one 
  66. iteration of the function, which produces one dot on the plane.
  67.  
  68. Now if the planet is the only planet in the whole universe, and if it happens 
  69. to be orbiting the sun in a perfectly circular orbit, we're going to have a
  70. pretty darn boring graph.  Each time the planet comes around, it's just going 
  71. to hit the very same spot again.  So it is like a fixed point.  It doesn't go 
  72. anywhere and it's not very exciting.
  73.  
  74. But let's suppose instead that there are a few other planets in our solar 
  75. system, and maybe our planet has a moon or two orbiting it.  Now all of a 
  76. sudden our perfectly circular orbit isn't quite so circular any more.  In 
  77. fact, our orbit is going to have quite a few interesting little perturbations 
  78. to it, and it definitely isn't going to hit the same spot on our plane each
  79. time around.  It is going to make a fascinating pattern of dots on the plane--
  80. something, as a matter of fact, like what you'll see if you run Function C.
  81. Because that's how Function C was made--imagining this kind of orbit, and how
  82. it would hit the plane, and then just figuring out the equations for the dots,
  83. so you don't have to think about all that gosh darned orbiting every time.  In
  84. fact, the parameter mu in this function is some kind of orbital incidence
  85. parameter or something.  Find Ekeland, ask him, and then we'll both know.
  86.  
  87. At any rate, back to area preserving.  It turns out that any function that is
  88. derived this way--by thinking about orbits hitting a plane and so on--has this
  89. area preserving property.  And (as I recall) the opposite is true, too--if you
  90. have an area preserving function, then you can find an orbit that fits it
  91. perfectly.
  92.  
  93.                                . . .
  94.  
  95.  
  96. Here's another interesting point about this function.  Try this function with
  97. mu=77 degrees, and you will notice that it makes a fractal pattern (see
  98. Iterate!.txt for more details).  What happens is that there is a large central
  99. circle with 5 smaller circles surrounding it.  Each of the smaller circles
  100. is surrounded by 5 even smaller circles.  These even smaller circles are
  101. surrounded by yet smaller circles, and so on ad infinitum.
  102.  
  103. (Actually, if you try this out, you will find that it is not always 5 circles
  104. surrounding, but maybe 3,4,5,6, or whatever.  But for the sake of simplicity,
  105. let's just say it's 5 each time.)
  106.  
  107. Here's a little schematic of sort of what this looks like (this time with
  108. 4 "circles" surrounding each larger "circle"--but that's the limitations
  109. of ASCII):
  110.  
  111.  
  112.                                                  
  113.                               O   O      O   O           
  114.                                                  
  115.                                ┌─┐        ┌─┐
  116.                                │ │        │ │
  117.                                └─┘        └─┘            
  118.                                                  
  119.                               O   O      O   O           
  120.                                                  
  121.                                    ┌────┐                
  122.                                    │    │
  123.                                    │    │    
  124.                                    │    │       
  125.                                    └────┘               
  126.                                                  
  127.                               O   O      O   O           
  128.                                                  
  129.                                ┌─┐        ┌─┐
  130.                                │ │        │ │
  131.                                └─┘        └─┘            
  132.                                                  
  133.                               O   O      O   O           
  134.                                                  
  135.  
  136.  
  137.  
  138. Now here's the point:  Let's suppose it takes 100 iterations to draw the
  139. middle (largest) circle satisfactorily.  Then it takes 5 times as many
  140. iterations to draw the five surrounding circles to the same degree of
  141. detail (if you try this function, you'll soon see why--it's because one
  142. point draws the entire middle circle, and another point draws all five
  143. surrounding circles, so it's spread 5 times as thin and requires 5 times
  144. the iterations to look as good).
  145.  
  146. If we go down another level to the next smaller circles, you will again have
  147. to 5 times the iterations to get the same degree of detail.  So now we're to
  148. 5 x 5 x 100 iterations = 2500 iterations.  Going down another level
  149. multiplies by 5 again, and we have 12,500 iterations.  Going to a fifth
  150. level requires 5 x 12,500 = 62,500 iterations.  For the sixth level,
  151. 5 x 62,500 = 312,500 iterations.  For the seventh level,
  152. 5 x 312,500 = 1,562,500.  Skipping a few levels (I assume you can
  153. multiply by 5 on your own), we find the the 20th level requires about
  154. 2,000,000,000,000,000 iterations.  (That's two quadrillion, just in case
  155. your wondering.  We know that this is a very, very, VERY large number,
  156. because--at this writing--it